package com.tian.elasticsearch.service.impl;

import com.tian.elasticsearch.entity.SysLogESEntity;
import com.tian.elasticsearch.service.SysLogESService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.data.elasticsearch.core.ElasticsearchRestTemplate;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * {@code @description:} 系统日志ES服务实现类
 *
 * @author tianwc 公众号：Java后端技术全栈
 * 在线刷题 1200+java面试题和1000+篇技术文章：<a href="https://woaijava.cc/">博客地址</a>
 * {@code @date:} 2024-10-08 11:43
 * {@code @version:} 1.0
 */
@Slf4j
@Service
public class SysLogESServiceImpl implements SysLogESService {
    @Resource
    private ElasticsearchRestTemplate elasticsearchRestTemplate;

    @Override
    public void save(SysLogESEntity logEntity) {
        elasticsearchRestTemplate.save(logEntity);
    }
}
